<%--
功能：获取与商品相关的促销规则列表 
--%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ tag import="java.util.List" %>
<%@ tag import="java.util.ArrayList" %>
<%@ tag import="org.springframework.context.ApplicationContext" %>
<%@ tag import="org.springframework.web.context.support.WebApplicationContextUtils" %>
<%@ tag import="com.probiz.estore.common.service.PromoService" %>
<%@ tag import="com.probiz.estore.sales.engine.PRule" %>


<%@ attribute name="product" type="com.probiz.estore.common.model.product.Product" required="true" description="商品" %>
<%@ attribute name="returnPRuleListName" type="java.lang.String" required="true" description="要返回的促销规则列表名称" %>

<%
	ApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(session.getServletContext());
	PromoService promoService = (PromoService) ctx.getBean("promoService");
	List<PRule> pruleList = promoService.getPromoInfoByProduct(product);
	request.setAttribute(returnPRuleListName,pruleList);
%>
<jsp:doBody />
